//
//  GoodsDetailPartTakeCell.m
//  YunGou
//
//  Created by macbook on 16/6/16.
//  Copyright © 2016年 macbook. All rights reserved.
//

#import "GoodsDetailPartTakeCell.h"
#import "YGProgressBarView.h"
@interface GoodsDetailPartTakeCell ()
@property (weak, nonatomic) IBOutlet YGProgressBarView *progressView;

@property (weak, nonatomic) IBOutlet UILabel *totalNeed;
@property (weak, nonatomic) IBOutlet UILabel *alreadyPartake;
@property (weak, nonatomic) IBOutlet UILabel *surplas;
@end

@implementation GoodsDetailPartTakeCell

- (void)awakeFromNib {
    // Initialization code
}

- (void)setModel:(ProductModel *)model{
    _progressView.progress = (double)model.canyurenshu/model.zongrenshu;
    _totalNeed.text = [NSString stringWithFormat:@"%ld", model.zongrenshu];
    _alreadyPartake.text = [NSString stringWithFormat:@"%ld",model.canyurenshu];
    _surplas.text = [NSString stringWithFormat:@"%ld",model.zongrenshu-model.canyurenshu];
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
